<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>考场签到</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width, user-scalable=no">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta name=”apple-mobile-web-app-status-bar-style” content=”default” />
    <meta name=”apple-mobile-web-app-status-bar-style” content=”black” />
    <meta name=”apple-mobile-web-app-status-bar-style” content=”black-translucent” />
    <meta content="telephone=no" name="format-detection">
    <meta content="email=no" name="format-detection">
    <meta name="format-detection" content="telephone=no"/>

    <link href="${s.base}/mobile/css/weui.min.css" rel="stylesheet" />
    <link href="${s.base}/mobile/css/jquery-weui.css" rel="stylesheet" />
    <link href="${s.base}/mobile/css/zhkw.css" rel="stylesheet">
    <script type="text/javascript" src="${s.base}/mobile/js/fontSize.js"></script>


</head>
<body>
<div class="main-content75">
    <div class="kw-sigin-tab" id="showTable">
        <table>
            <thead>
            <tr>
                <th style="width:1.4rem;">座位号</th>
                <th>姓名</th>
                <th>学号</th>
                <th>考勤</th>
            </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    </div>
    <!--<div class="bot-xfbtn-ctn">-->
        <!--<div class="bot-xfbtn-menu">提交</div>-->
    <!--</div>-->
</div>
</body>

<script type="text/javascript" src="${s.base}/mobile/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="${s.base}/mobile/js/fontSize.js"></script>
<script type="text/javascript" src="${s.base}/mobile/js/jquery-weui.js"></script>
<script type="text/javascript" src="${s.base}/mobile/js/fastclick.js"></script>
<script type="text/javascript" src="${s.base}/mobile/js/common.js"></script>
<script type="text/javascript">
    var applyId = '${applyId}';
    var token = '${token}';
    var ksId = '${ksId}';
    var kcId = '${kcId}';
    var signType = '${signType}';
    var kmId = '${kmId}';
    $(function(){
        initMySocietyData();
    })

    function initMySocietyData() {
        $.fn.doGet('/phone/kwmanagement/studentSignListNew', {applyId:applyId,token:token,ksId:ksId,kcId:kcId,signType:signType,kmId:kmId}, function (result) {
            if (result.code === 0) {
                postMySocietyData(result.data);
            } else {
                $.toast('获取数据失败', "text");
            }
        });

    }
    function postMySocietyData(data) {
        var str = '';
        if (data != null && data.length > 0) {
            for (var i = 0; i < data.length; i++) {
                var e =data[i];
                str +='<tr>'+
                    ' <td>'+e.seatNum+'</td>'+
                    ' <td>'+e.name+'</td>'+
                    ' <td>'+e.userNumber+'</td>';
                if (e.signState =='0'){
                    str +=  '<td><span class="red">缺考</span></td>';
                }else if (e.signState =='1'){
                    str += '<td><span class="blue">到勤</span></td>';
                } else if (e.signState =='2'){
                    str += '<td>'+
                        '<label class="my_protocol">'+
                        '<input class="input_agreement_protocol" type="checkbox" />'+
                        '<span></span>'+
                        '</label>'+
                        '</td>';
                }
                str +='</tr>';
            }
            $("#showTable tbody").html(str);
        }
    }


</script>
</html>
